package com.ktjy.ch15.mapper;

import com.ktjy.ch15.entity.Supplier;
import com.ktjy.ch15.entity.SysRole;
import com.ktjy.ch15.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierMapper {
    public List<Supplier> getAll();

    public Supplier getBySupCode(@Param("supCode") String supCode);
    /**
     * 查询分页信息
     * @param supplier
     * @param pageBegin
     * @param pageSize
     * @return
     */
    public List<Supplier> getPage(@Param("supplier") Supplier supplier,
                                 @Param("pageBegin") Integer pageBegin,
                                 @Param("pageSize") Integer pageSize);

    /**
     * 查询总记录数
     * @param supplier
     * @return
     */
    public Integer count(@Param("supplier") Supplier supplier);

    public int insert(Supplier supplier);

    public Supplier getById(@Param("id") Long id);

    public int update(Supplier supplier);

    public int delete(@Param("id") Long id);

    public Supplier findBySupCode(@Param("supCode") String supCode);
}
